import request from '@/utils/request';

export const getCheckoutApi = () => {
    return request({
        url: '/member/order/pre',
        method: 'get'
    })
}

// 创建订单

export const createOrderApi = (data) => {
    return request({
        url: '/member/order',
        method: 'post',
        data
    })

}

// 添加地址
export const addAddressApi = (data) => {
    console.log(data);
    return request({
        url: '/member/address',
        method: 'post',
        data
    })

}
// 删除地址
export const deleteAddressApi = (id) => {
    return request({
        url: `/member/address/${id}`,
        method: 'delete'
    })
}